package com.uwo.house.service.serviceImpl;

import java.util.Date;
import java.util.List;

import com.uwo.house.beans.PayLogEntity;
import com.uwo.house.beans.request.CustomerOrderReq;
import com.uwo.house.beans.request.MeasureOrderReq;
import com.uwo.house.beans.response.MeasureOrderResp;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.uwo.house.beans.response.OrderTypeResp;
import com.uwo.house.dao.OrderMeasureDao;
import com.uwo.house.service.IOrderMeasureService;

@Service
public class OrderMeasureService implements IOrderMeasureService {
    @Autowired
    private OrderMeasureDao orderMeasureDao;

    public int addOrderMeasure(CustomerOrderReq customerOrderReq) {
        return this.orderMeasureDao.addOrderMeasure(customerOrderReq);
    }

    public String getDecorationById(String packageId){
        return this.orderMeasureDao.getDecorationById(packageId);
    }

    public void addOrder(String orderId) {
        this.orderMeasureDao.addOrder(orderId);
    }

    public List<MeasureOrderResp> getMeasureOrder(String orderId, Date orderDateFrom, Date orderDateTo, int orderSts) {
        return this.orderMeasureDao.getMeasureOrder(orderId, orderDateFrom, orderDateTo, orderSts);
    }

    public MeasureOrderResp getMeasureDetailsByOrderId(String orderId) {
        return this.orderMeasureDao.getMeasureDetailsByOrderId(orderId);
    }

    public int deleteMeasureOrder(String orderId) {
        return this.orderMeasureDao.deleteMeasureOrder(orderId);
    }

    public int distributeOrder(String measureStaff, String orderId) {
        return this.orderMeasureDao.distributeOrder(measureStaff, orderId);
    }

    public void addPayLog(PayLogEntity payLogEntity) {
        this.orderMeasureDao.addPayLog(payLogEntity);
    }

    public String getUserIdByOrderId(String orderId){
        return orderMeasureDao.getUserIdByOrderId(orderId);
    }

}
